﻿using SqlSugar.IOC;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Wq.Model;
using log4net;

namespace Wq.Extensions.Repository
{
    public class SqlSugarBaseRepository<T> : SimpleClient<T> where T : class, new()
    {
        protected ITenant itenant = null;//多租户事务  
        public SqlSugarBaseRepository(ISqlSugarClient context = null) : base(context)//注意这里要有默认值等于null
        {
            base.Context = DbScoped.SugarScope.GetConnectionScopeWithAttr<T>();
            itenant = DbScoped.SugarScope;//设置租户接口
        }
        //private static readonly ILog log = LogManager.GetLogger(typeof(T));
    }
}
